package at.jku.ssw.fortress.util;

import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.osgi.framework.Bundle;

import at.jku.ssw.fortress.ui.FortressPlugin;

public class Logger {
	
	public static void logError(String message, Throwable ex) {
		IStatus status = new Status(IStatus.ERROR, FortressPlugin.PLUGIN_ID, 0, message, ex);
		Bundle bundle = Platform.getBundle(FortressPlugin.PLUGIN_ID);
		Platform.getLog(bundle).log(status);
	}

	public static void logError(IStatus status) {
		Bundle bundle = Platform.getBundle(FortressPlugin.PLUGIN_ID);
		Platform.getLog(bundle).log(status);
	}

}
